/*******************************************************************
 * Copyright (C) yel_hb-USTC, 2012                                
 *                                                                  
 * FILE NAME             :  median.h                                 
 * PRINCIPAL AUTHOR      :  yel_hb                               
 * MODULE NAME           :  MEDIAN                             
 * LANGUAGE              :  C++                                      
 * TARGET ENVIRONMENT    :  windows                                   
 * DATE OF FIRST RELEASE :  2012/12/18                              
 * DESCRIPTION           :  class median definition
 ******************************************************************/

/*
 * Revision log:
 *
 * Created by yel_hb,2012/12/18
 *
 */

#ifndef MEDIAN_H     
#define MEDIAN_H    1

#include <vector>
using namespace std;

class Median 
{
public:
	Median ();
	void reset ();
	void add ( double value );
	double get_median ();
	~Median ();

private:
	vector<double> vlist;
	double median;
};

#endif